package com.ustudy.entity.cms;

import java.util.Collections;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.ustudy.core.dao.support.entity.StringIdEntity;

/**
 * 新闻栏目
 * @author Hector
 *
 */
@SuppressWarnings("serial")
@Entity(name="PageChannel")
@Table(name="CMS_PAGE_CHANNEL")
public class PageChannel extends StringIdEntity {
	
	private String code;
	
	private String name;
	
	@OneToMany(cascade={CascadeType.ALL},fetch=FetchType.LAZY,mappedBy="pageChannel")
	private List<Article> articles=Collections.emptyList();
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Article> getArticles() {
		return articles;
	}

	public void setArticles(List<Article> articles) {
		this.articles = articles;
	}
	
}
